from typing import List

class Solution:
    def maxArea(self, height: List[int]) -> int:
        """
        使用双指针法计算最大容量
        """
        left, right = 0, len(height) - 1
        max_water = 0
        while left < right:
            current_area = (right - left) * min(height[left], height[right])
            max_water = max(max_water, current_area)
            if height[left] < height[right]:
                left += 1
            else:
                right -= 1
        return max_water    